<!-- 发布 -->
<template>
  <div class="box">
    <div class="box-header">
      <div @click="fanhui">《返回</div>
      <div>添加直播</div>
      <div></div>
    </div>
    <div class="box-bbody">
      <div class="B-box1">
        <!-- which="100%" height="100%" -->
        <van-uploader v-model="fileList" multiple :max-count="1">
          <div class="van-box">
            <span class="spna-span1">+</span>
            <span class="spna-span2">添加直播照片</span>
          </div>
        </van-uploader>
      </div>
      <div class="B-box2">
        <input type="text" placeholder="请输入直播号" />
      </div>
    </div>
    <div class="box-footer">
      <button>发布</button>
    </div>
  </div>
</template>

<script>
import { ref } from "vue";
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    //这里存放数据
    const fileList = ref([]);
    return {
      fileList,
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    fanhui() {
      this.$router.push("/Zhibo");
    },
  },
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
};
</script>
<style lang='scss' scoped>
.box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: paleturquoise;
}
.box-header {
  width: 100%;
  height: 50px;
  color: #fff;
  background: blue;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 10px;
}
.box-bbody {
  width: 100%;
  flex: 1;
  overflow-x: hidden;
  background: #fff;
  padding: 0px 20px;
}
// .box-bbody img {
//   width: 335px;
//   height: 150px;
// }
.B-box1 {
  margin-top: 10px;
  width: 100%;
  height: 150px;
  background: rgb(255, 255, 255);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid #ccc;
}
.van-box {
  //   background: red;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.spna-span1 {
  width: 335px;
  //   background: green;
  text-align: center;
  height: 100px;
  font-size: 50px;
  line-height: 100px;
  color: #ccc;
}
.spna-span2 {
  width: 335px;
  height: 50px;
  //   background: greenyellow;
  text-align: center;
  line-height: 50px;
  color: #ccc;
}

.B-box2 {
  width: 100%;
  height: 50px;
  background: papayawhip;
  border: 2px solid #ccc;
}
.B-box2 input {
  width: 100%;
  height: 100%;
  outline: none;
  border: none;
  padding: 0px 10px;
  color: #ccc;
}

////////////////////
.box-footer {
  width: 100%;
  height: 50px;
}
.box-footer button {
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 50px;
  color: #fff;
  font-weight: bolder;
  outline: none;
  border: none;
  background: rgb(0, 153, 255);
}
.box-footer button:hover {
  background: rgb(7, 129, 211);
}
// .van-uploader__wrapper {
//   width: 10px;
//   height: 100%;
// }
// .van-uploader__upload {
//   width: 100%;
//   height: 100%;
// }
</style>